package shejimoshi;

public class IPhoneX implements IBuildPhone {

    private MobilePhone mobilePhone;

    public IPhoneX() {
        mobilePhone = new MobilePhone();
    }

    /**
     * 建造手机屏幕
     */
    @Override
    public void buildScreen() {
        mobilePhone.setScreen("OLED显示屏");
    }

    /**
     * 建造手机电池
     */
    @Override
    public void buildBattery() {
        mobilePhone.setBattery("2700mAh电池容量");
    }

    /**
     * 建造手机听筒
     */
    @Override
    public void buildMicrophone() {
        mobilePhone.setMicrophone("听筒");
    }

    /**
     * 建造手机话筒
     */
    @Override
    public void buildPhoneReceiver() {
        mobilePhone.setPhoneReceiver("话筒");
    }

    /**
     * 建造手机机身
     */
    @Override
    public void buildPhoneBody() {
        mobilePhone.setPhoneBody("iphoneX机身");
    }

    /**
     * 创建手机
     *
     * @return
     */
    public MobilePhone build() {
        return mobilePhone;
    }
}